﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.Security;
public partial class account_login : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    //protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    //{
    //    Login loginTemp = (Login)sender;
    //    string userName = loginTemp.UserName;
    //    string passWord = loginTemp.Password;
    //    string query = "SELECT * FROM [taxi].[dbo].[User] WHERE UserName = '" + userName + "' AND userPass = '" + passWord + "'";

    //    DataSet ds = DBClass.Default.SelectCommand(query);

    //    if (ds != null && ds.Tables[0].Rows.Count > 0)
    //    {
    //        e.Authenticated = true;
    //        String userType = ds.Tables[0].Rows[0]["Type"].ToString();
    //        String userId = ds.Tables[0].Rows[0]["ProfileID"].ToString();
    //        Session["UserType"] = Convert.ToInt32(userType);
    //        Session["UserId"] = Convert.ToInt32(userId);
    //        //Login1.FailureText = "OK !!!";

    //        //Session["UserName"] = ds.Tables[0].Rows[0];

    //    }
    //    else
    //    {
    //        loginTemp.FailureText = "FAILED with " + loginTemp.UserName;
    //    }
    //}
    //protected void Logout_Click(object sender, EventArgs e)
    //{
    //    Session["UserType"] = 3;
    //    Session["UserId"] = 0;
    //    Response.Redirect("~/");
    //}
}